import java.util.Scanner;

public class Demo {
    public static void main(String[] args) {
        Scanner scan = new Scanner(System.in);
        int count = 0;
        int sum = 0;

        while(scan.hasNextInt()) {
            int n = scan.nextInt();
            if( n == 0) {
                return;
            }else if(n < 2 ){
                System.out.println(0);
            }

            System.out.println(n/2);
        }

    }
}
